


import lookupDrawer from '@/components/TableLookup.vue';
 export default {
    data() {
        return {
        }
    },
    methods: {  
        TableViewGetLookUp($scoped,id){
          try{
             return $scoped[$scoped.length - 1].columns[id]
          }catch(e){
            return '';
          }
        },
        TableViewGetAddress($scoped){
          try{
             return JSON.parse($scoped).map(item => item.name).join('/')
          }catch(e){
            return '';
          }
        },
        imgSrc($scoped) {
          try {
            return JSON.parse($scoped).map(item => item.url);
          } catch (e) {
            return [];
          }
        },
        TableViewShowLookupDrawer(uuid,fiedId,  $scoped){
          const fieldObj = this.controlProperties[uuid].tableColums.find((v) => {
          const ids =
          typeof v.columId === 'string' ? v.columId : v.columId.join(',')
            return ids === fiedId
          })
          const subList=fieldObj.subList;
          const list =$scoped.map(v=>v.columns)
          this.$refs['lookupDrawer'].init(
           subList,
            list
          );
          
        },
        TableClick($scoped,id){
          this.tableItem=$scoped;
          this[id]();
        }

    },
    created(){
            
    },
    components:{
      lookupDrawer,
    }
    }
